<html>
<head>
<script>
  var o = {
    name: 'Jack',
    age: 20,
    city: 'Beijing'
  };
  for (var key in o) {
    alert(key); // 'name', 'age', 'city'
  }
</script>
</head>
<body>
  for...in 遍历每个元素
</body>
</html>
